package com.lzy.wzy.service;

import com.github.pagehelper.PageInfo;
import com.lzy.wzy.model.DepartmentBean;
import com.lzy.wzy.model.PermissionBean;
import com.lzy.wzy.model.RoleBean;
import com.lzy.wzy.model.User;
import com.lzy.wzy.result.Result;
import com.lzy.wzy.vo.*;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

public interface AdminService {

    //添加用户
    Result<T> addUser(UserVo userVo);

    //查询所有用户信息
    Result<PageInfo<User>> queryAllUserInfo(Integer pageSize, Integer pageNum);

    //修改用户信息
    Result<T> modifyUserInfo(ModifyUserVo userVo);


    //加载管理员页面职位和部门信息
    Result<AdminPageInitVo> adminPageInitLoad();

    //获取所有角色信息
    Result<List<RoleBean>> doGetAllRole();

    //删除用户
    Result<T> deleteUsers(String userUuid);

    //多条件查询用户
    Result<PageInfo<User>> doMultiConditionQueryUser(int pageSize, int pageNum, String searchValue);

    //通过角色查询用户
    Result<PageInfo<User>> doQueryUserInformationByRole(int pageSize, int pageNum, String roleId);

    //通过部门查询员工
    Result<PageInfo<User>> doQueryUserInformationByDepartment(int pageSize, int pageNum, String departmentId);

    //添加新的角色
    Result<T> doAddNewPosition(String roleName,List<Integer> permissionIds,int departmentId);

    //添加新部门
    Result<T> doAddNewDepartment(String departmentName);

    //获取所有部门
    Result<List<DepartmentBean>> doGetAllDepartment();

    //获取此部门下所有权限信息
    Result<List<PermissionBean>> doGetPermissionUnderTheDepartment(String departmentId);

    //查询部门下所有的职位
    Result<List<RoleBean>> doGetAPositionUnderTheDepartment(String departmentId);

    //删除角色信息
    Result<T> doDeleteRoleInfo(int roleId);


    //获取用户姓名，账户，角色信息
    Result<UserPartInfoVo> doGetUserPartInfo();

    //重置密码
    Result<T> doResetPassword(String userId);

    //获取所有工号
    Result<List<KeyValueVo>> doGetAllJobNumber();

    //禁用用户
    Result<Integer> doDisableUser(String userId);

    //解封用户
    Result<Integer> doUnlockTheUser(String userId);

    //邮箱绑定
    Result<T> doBingdingEmail(String email);
}
